From 49ad34e4f41bc6e3691b07bae1c470fd7c2b8c1c Mon Sep 17 00:00:00 2001 From: Tim Deegan Date: Fri, 9 Mar 2007 12:16:21 +0000 Subject: [PATCH] [XEN] Don't let the tools take away all of a domain's vcpus. Signed-off-by: Weidong Han --- xen/common/domctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/domctl.c b/xen/common/domctl.c index 3a45586d65..b765964cb1 100644 --- a/xen/common/domctl.c +++ b/xen/common/domctl.c @@ -360,7 +360,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domctl_t) u_domctl) unsigned int i, max = op->u.max_vcpus.max, cpu; ret = -EINVAL; - if ( max > MAX_VIRT_CPUS ) + if ( max > MAX_VIRT_CPUS || max == 0 ) break; ret = -ESRCH; -- 2.30.2